package com.captainbank.tcl.tclapplication.ui.activity.function;

import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.View;

//import com.bigdevil.sphereview.SphereView;
import com.captainbank.tcl.tclapplication.R;
import com.captainbank.tcl.tclapplication.ui.activity.basic.BaseActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by TCL on 2019/10/18.
 * Describe:
 */
public class SphereViewActivity extends BaseActivity {
    @BindView(R.id.toolbar)
    Toolbar toolbar;
//    @BindView(R.id.sphere_view)
//    SphereView sphereView;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_sphere_view;
    }

    @Override
    protected void initView() {
        toolbar.setTitle(getString(R.string.title_sphere_view));

        for (int i = 0; i < 10; i++) {
            View view = LayoutInflater.from(this).inflate(R.layout.item_sphere_view, null);
//            sphereView.addView(view);
        }
    }

    @OnClick({R.id.btn_add, R.id.btn_remove})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.btn_add:
                View newView = LayoutInflater.from(this).inflate(R.layout.item_sphere_view, null);
//                sphereView.addView(newView);
                break;
            case R.id.btn_remove:
//                sphereView.removeViewAt(sphereView.getChildCount() - 1);
                break;
        }
    }
}
